package com.tutu.docker.service.impl;

import com.tutu.docker.dao.BooksMapper;
import com.tutu.docker.entity.Books;
import com.tutu.docker.service.BooksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Program: SpringBoot
 * @Description:
 * @Author: JK.TuTu
 * @Create: 2022-11-09 16:08
 **/
@Service("booksService")
public class BookServiceImpl implements BooksService {
    @Autowired
    private BooksMapper booksMapper;

    @Override
    public List<Books> queryAll() {
        return booksMapper.queryAll();
    }

    @Override
    public Books queryById(Integer id) {
        return booksMapper.queryById(id);
    }

    @Override
    public void insert(Books books) {
        booksMapper.insert(books);
    }

    @Override
    public void update(Books books) {
        booksMapper.update(books);
    }

    @Override
    public void deleteById(Integer id) {
        booksMapper.deleteById(id);
    }
}
